package com.stx.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@TableName("r_ruanyue")
public class Ruanyue {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;//软约id
    private Integer ruaNumber;//软约期数
    @NotEmpty(message = "活动名称不能够为空")
    private String ruaName;//软约名称
    private String ruaSubject;//软约主题
    @NotEmpty(message = "活动地点不能够为空")
    private String ruaAddress;//软约地点
    private String ruaDepartment;//软约举办部门
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull
    private LocalDateTime ruaTime;//软约举办时间
    private Integer ruaState;//软约状态
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime ruaDate;//创建时间
    @TableField(exist = false)
    private Integer total;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRuaNumber() {
        return ruaNumber;
    }

    public void setRuaNumber(Integer ruaNumber) {
        this.ruaNumber = ruaNumber;
    }

    public @NotEmpty(message = "活动名称不能够为空") String getRuaName() {
        return ruaName;
    }

    public void setRuaName(@NotEmpty(message = "活动名称不能够为空") String ruaName) {
        this.ruaName = ruaName;
    }

    public String getRuaSubject() {
        return ruaSubject;
    }

    public void setRuaSubject(String ruaSubject) {
        this.ruaSubject = ruaSubject;
    }

    public @NotEmpty(message = "活动地点不能够为空") String getRuaAddress() {
        return ruaAddress;
    }

    public void setRuaAddress(@NotEmpty(message = "活动地点不能够为空") String ruaAddress) {
        this.ruaAddress = ruaAddress;
    }

    public String getRuaDepartment() {
        return ruaDepartment;
    }

    public void setRuaDepartment(String ruaDepartment) {
        this.ruaDepartment = ruaDepartment;
    }

    public @NotNull LocalDateTime getRuaTime() {
        return ruaTime;
    }

    public void setRuaTime(@NotNull LocalDateTime ruaTime) {
        this.ruaTime = ruaTime;
    }

    public Integer getRuaState() {
        return ruaState;
    }

    public void setRuaState(Integer ruaState) {
        this.ruaState = ruaState;
    }

    public LocalDateTime getRuaDate() {
        return ruaDate;
    }

    public void setRuaDate(LocalDateTime ruaDate) {
        this.ruaDate = ruaDate;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    @Override
    public String toString() {
        return "Ruanyue{" +
                "id=" + id +
                ", ruaNumber=" + ruaNumber +
                ", ruaName='" + ruaName + '\'' +
                ", ruaSubject='" + ruaSubject + '\'' +
                ", ruaAddress='" + ruaAddress + '\'' +
                ", ruaDepartment='" + ruaDepartment + '\'' +
                ", ruaTime=" + ruaTime +
                ", ruaState=" + ruaState +
                ", ruaDate=" + ruaDate +
                ", total=" + total +
                '}';
    }
}
